const router = require('koa-router')()
const UserController = require('../controller/user')
const workController = require('../controller/work')//引用该work文件

router.prefix('/api')

// router.post('/users', UserController.register)
router.post('/excel/:address', UserController.importPeople)
router.post('/login', UserController.login)

router.get('/users', UserController.get)
router.put('/users', UserController.update)
router.patch('/users/:id', UserController.updateById)
router.delete('/users', UserController.DelUser)

router.post('/logout', UserController.logout)
router.post('/upload', UserController.uploadfile)

//对应方法
router.post('/submit', workController.submit)
router.post('/getWorkData', workController.getWorkData)


module.exports = router
